<ioms-header></ioms-header>

<article class="container-fluid">

    <div class="row">
        <div class="col-md-2 side">


        </div>
        <div class="col-md-10 main">

            <h1>消息推送
                <small>通过小秘书向 App 用户单发/群发消息</small>
            </h1>

            <uib-tabset active="active">
                <uib-tab select="changePushType('single')">
                    <uib-tab-heading>
                        <i class="glyphicon glyphicon-send"></i> 单条消息推送
                    </uib-tab-heading>
                    <div class="layout-ph20">

                        <form name="formMessagePushSingle" class="form-horizontal">
                            <div class="form-group"><!-- ng-class="{'has-error': formMessagePushSingle.userId.$error.required}"-->
                                <!--<label class="col-md-1 control-label">手机号</label>-->
                                <div class="col-md-6">
                                    <input class="form-control" type="text" placeholder="请输入 INVITE 用户 ID" name="userId" ng-model="messagePoll.single.userId" required>
                                    <!--
                                      todo:增加表单验证 tooltip
                                    uib-tooltip="请输入 INVITE 用户 ID" tooltip-trigger="none" tooltip-is-open="formMessagePushSingle.userId.$error.required"
                                    -->
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label">消息标题</label>-->
                                <div class="col-md-6">
                                    <input type="text" class="form-control" placeholder="请输入推送消息的标题" ng-model="messagePoll.single.summary" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label">消息内容</label>-->
                                <div class="col-md-6">
                                    <textarea class="form-control" cols="30" rows="5" placeholder="请输入消息内容" ng-model="messagePoll.single.message" required></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label"></label>-->
                                <div class="col-md-6">
                                    <button type="submit" ng-click="pushMessage('single')" class="btn btn-primary">确认推送</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </uib-tab>
                <uib-tab select="changePushType('all')">
                    <uib-tab-heading>
                        <i class="glyphicon glyphicon-comment"></i> 群发消息
                    </uib-tab-heading>
                    <div class="layout-ph20">

                        <form class="form-horizontal">
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label">手机号</label>-->
                                <div class="col-md-6">
                                    <input class="form-control" type="text" placeholder="请选择群发时间" ng-model="messagePoll.all.time" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label">消息标题</label>-->
                                <div class="col-md-6">
                                    <input type="text" class="form-control" placeholder="请输入推送消息的标题" ng-model="messagePoll.all.summary" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label">消息内容</label>-->
                                <div class="col-md-6">
                                    <textarea class="form-control" cols="30" rows="5" placeholder="请输入消息内容" ng-model="messagePoll.all.message" required></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <!--<label class="col-md-1 control-label"></label>-->
                                <div class="col-md-6">
                                    <button type="button" ng-click="pushMessage('all')" class="btn btn-primary">确认推送</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </uib-tab>
            </uib-tabset>

        </div>
    </div>

</article>
